import http from '@/plugins/axios'

// 列表
export function getDataDictionaryList() {
  return http({
    method: 'POST',
    url: '/ykf/dict/list'
  })
}

// 明细
export function getDataDictionary(dictId) {
  return http({
    method: 'POST',
    url: '/ykf/dictDetail/list',
    data: { dictId }
  })
}

// 新增
export function addDataDictionary(data) {
  return http({
    method: 'POST',
    url: '/ykf/dict/save',
    data
  })
}

// 新增明细
export function addDataDictionaryDetail(data) {
  return http({
    method: 'POST',
    url: '/ykf/dictDetail/save',
    data
  })
}

// 编辑明细
export function updateDataDictionaryDetail(data) {
  return http({
    method: 'POST',
    url: '/ykf/dictDetail/update',
    data
  })
}

// 删除明细
export function removeDataDictionaryDetail(data) {
  return http({
    method: "POST",
    url: '/ykf/dictDetail/delete',
    data
  })
}

// 排序
export function sortDataDictionaryDetail(data) {
  return http({
    method: "POST",
    url: '/ykf/dictDetail/sortDetail',
    data
  })
}
